Optimal. Leaf size=91 \[ \frac {a^2 (i A+B)}{3 c^6 f (i+\tan (e+f x))^6}-\frac {a^2 (A-3 i B)}{5 c^6 f (i+\tan (e+f x))^5}-\frac {a^2 B}{4 c^6 f (i+\tan (e+f x))^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, Rules used = {3669, 78}
\begin {gather*} -\frac {a^2 (A-3 i B)}{5 c^6 f (\tan (e+f x)+i)^5}+\frac {a^2 (B+i A)}{3 c^6 f (\tan (e+f x)+i)^6}-\frac {a^2 B}{4 c^6 f (\tan (e+f x)+i)^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 3669
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^2 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^6} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {(a+i a x) (A+B x)}{(c-i c x)^7} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \text {Subst}\left (\int \left (-\frac {2 i a (A-i B)}{c^7 (i+x)^7}+\frac {a (A-3 i B)}{c^7 (i+x)^6}+\frac {a B}{c^7 (i+x)^5}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a^2 (i A+B)}{3 c^6 f (i+\tan (e+f x))^6}-\frac {a^2 (A-3 i B)}{5 c^6 f (i+\tan (e+f x))^5}-\frac {a^2 B}{4 c^6 f (i+\tan (e+f x))^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.03, size = 143, normalized size = 1.57 \begin {gather*} -\frac {i a^2 (45 A+8 (8 A+i B) \cos (2 (e+f x))+10 (2 A+i B) \cos (4 (e+f x))-16 i A \sin (2 (e+f x))+32 B \sin (2 (e+f x))-10 i A \sin (4 (e+f x))+20 B \sin (4 (e+f x))) (\cos (8 e+10 f x)+i \sin (8 e+10 f x))}{960 c^6 f (\cos (f x)+i \sin (f x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.30, size = 66, normalized size = 0.73
method | result | size |
derivativedivides | \(\frac {a^{2} \left (-\frac {-2 i A -2 B}{6 \left (i+\tan \left (f x +e \right )\right )^{6}}-\frac {B}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {-3 i B +A}{5 \left (i+\tan \left (f x +e \right )\right )^{5}}\right )}{f \,c^{6}}\) | \(66\) |
default | \(\frac {a^{2} \left (-\frac {-2 i A -2 B}{6 \left (i+\tan \left (f x +e \right )\right )^{6}}-\frac {B}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {-3 i B +A}{5 \left (i+\tan \left (f x +e \right )\right )^{5}}\right )}{f \,c^{6}}\) | \(66\) |
risch | \(-\frac {a^{2} {\mathrm e}^{12 i \left (f x +e \right )} B}{192 c^{6} f}-\frac {i a^{2} {\mathrm e}^{12 i \left (f x +e \right )} A}{192 c^{6} f}-\frac {{\mathrm e}^{10 i \left (f x +e \right )} B \,a^{2}}{80 c^{6} f}-\frac {i {\mathrm e}^{10 i \left (f x +e \right )} a^{2} A}{40 c^{6} f}-\frac {3 i a^{2} A \,{\mathrm e}^{8 i \left (f x +e \right )}}{64 c^{6} f}+\frac {{\mathrm e}^{6 i \left (f x +e \right )} B \,a^{2}}{48 c^{6} f}-\frac {i {\mathrm e}^{6 i \left (f x +e \right )} a^{2} A}{24 c^{6} f}+\frac {a^{2} {\mathrm e}^{4 i \left (f x +e \right )} B}{64 c^{6} f}-\frac {i a^{2} {\mathrm e}^{4 i \left (f x +e \right )} A}{64 c^{6} f}\) | \(196\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.07, size = 109, normalized size = 1.20 \begin {gather*} -\frac {5 \, {\left (i \, A + B\right )} a^{2} e^{\left (12 i \, f x + 12 i \, e\right )} + 12 \, {\left (2 i \, A + B\right )} a^{2} e^{\left (10 i \, f x + 10 i \, e\right )} + 45 i \, A a^{2} e^{\left (8 i \, f x + 8 i \, e\right )} + 20 \, {\left (2 i \, A - B\right )} a^{2} e^{\left (6 i \, f x + 6 i \, e\right )} + 15 \, {\left (i \, A - B\right )} a^{2} e^{\left (4 i \, f x + 4 i \, e\right )}}{960 \, c^{6} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 379 vs. \(2 (73) = 146\).
time = 0.60, size = 379, normalized size = 4.16 \begin {gather*} \begin {cases} \frac {- 141557760 i A a^{2} c^{24} f^{4} e^{8 i e} e^{8 i f x} + \left (- 47185920 i A a^{2} c^{24} f^{4} e^{4 i e} + 47185920 B a^{2} c^{24} f^{4} e^{4 i e}\right ) e^{4 i f x} + \left (- 125829120 i A a^{2} c^{24} f^{4} e^{6 i e} + 62914560 B a^{2} c^{24} f^{4} e^{6 i e}\right ) e^{6 i f x} + \left (- 75497472 i A a^{2} c^{24} f^{4} e^{10 i e} - 37748736 B a^{2} c^{24} f^{4} e^{10 i e}\right ) e^{10 i f x} + \left (- 15728640 i A a^{2} c^{24} f^{4} e^{12 i e} - 15728640 B a^{2} c^{24} f^{4} e^{12 i e}\right ) e^{12 i f x}}{3019898880 c^{30} f^{5}} & \text {for}\: c^{30} f^{5} \neq 0 \\\frac {x \left (A a^{2} e^{12 i e} + 4 A a^{2} e^{10 i e} + 6 A a^{2} e^{8 i e} + 4 A a^{2} e^{6 i e} + A a^{2} e^{4 i e} - i B a^{2} e^{12 i e} - 2 i B a^{2} e^{10 i e} + 2 i B a^{2} e^{6 i e} + i B a^{2} e^{4 i e}\right )}{16 c^{6}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 381 vs. \(2 (78) = 156\).
time = 1.34, size = 381, normalized size = 4.19 \begin {gather*} -\frac {2 \, {\left (15 \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{11} + 60 i \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{10} - 15 \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{10} - 235 \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} - 20 i \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} - 480 i \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} + 90 \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} + 822 \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} + 84 i \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} + 904 i \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} - 158 \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} - 822 \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 84 i \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 480 i \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 90 \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 235 \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 20 i \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 60 i \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 15 \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 15 \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{15 \, c^{6} f {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{12}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.94, size = 118, normalized size = 1.30 \begin {gather*} -\frac {\frac {B\,a^2\,{\mathrm {tan}\left (e+f\,x\right )}^2}{4}+\frac {a^2\,\mathrm {tan}\left (e+f\,x\right )\,\left (12\,A-B\,6{}\mathrm {i}\right )}{60}-\frac {a^2\,\left (-B+A\,8{}\mathrm {i}\right )}{60}}{c^6\,f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^6+{\mathrm {tan}\left (e+f\,x\right )}^5\,6{}\mathrm {i}-15\,{\mathrm {tan}\left (e+f\,x\right )}^4-{\mathrm {tan}\left (e+f\,x\right )}^3\,20{}\mathrm {i}+15\,{\mathrm {tan}\left (e+f\,x\right )}^2+\mathrm {tan}\left (e+f\,x\right )\,6{}\mathrm {i}-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________